package task2

import scala.io.StdIn

class User(var name: String, /*override */var score: Int) /*extends Player(name, score)*/ {

  /*override */def showFist(): String = {
    println("请出拳！ 1. 剪刀 2. 石头 3. 布")
    val str: String = StdIn.readLine()
    val fist = str match {
      case "1" => "剪刀"
      case "2" => "石头"
      case "3" => "布"
      case _ => {
        println("输入不符合规范，默认出布")
        "布"
      }
    }
    println(s"你出拳：$fist")
    fist
  }
}
